<?php
defined( 'BASEPATH' ) or exit( 'No direct script access allowed' );
class Page_model extends MY_Model
{
    function get($id)
    {
        $this->_db->select( $this->_table );
        $this->_db->where( '`id`=? and `enable`=1 and `deleted`=0', $id );
        $this->_db->limit( 1 );
        return $this->_db->fetch_row();
    }
    function get_tpl($tpl_id)
    {
        $this->_db->select( 'page_tpl' );
        $this->_db->where( '`id`=? and `enable`=1 and `deleted`=0', $tpl_id );
        $this->_db->limit( 1 );
        return $this->_db->fetch_row();
    }
}